<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib uri='http://java.sun.com/jsp/jstl/core' prefix='c'%>
<!DOCTYPE html >
<html>
<head>
<title>Job Hunter - ajout contact</title>
</head>
<body>

	<div id="breadcrumb">
		<a href="/main" >accueil</a> >
		<a href="/contactsList" >contact</a>
		 > ajout
	</div>
	<form action="addContactValidate" method="post">
		<h1>Contact Form</h1>
		<c:choose>
			<c:when test="${company != null}">
				<h2> For Company : ${company.name }</h2>
				<input type="hidden" name="companyId" value="${company.id }"/>
				<input type="hidden" name="page" value="company" />
			</c:when>
			<c:otherwise>
				<div>
					<label>Company : </label> <select name="companyId">
						<c:forEach items="${companies}" var="company">
							<option value="${company.id}">${company.name}</option>
						</c:forEach>
					</select>
				</div>
			</c:otherwise>
		</c:choose>
		<div>
			<label>First Name : </label><input type="text" name="firstName" />
		</div>
		<div>
			<label>Last Name : </label><input type="text" name="lastName" />
		</div>
		<div>
			<label>function : </label><input type="text" name="function" />
		</div>
		<div>
			<label>Phone : </label><input type="text" name="phone" />
		</div>
		<div>
			<label>EMail : </label><input type="text" name="email" />
		</div>
		<div>
			<label>Description : </label><input type="text" name="description" />
		</div>


		<td>${contact.company.name }</td>
		<div>
			<input type="submit" />
		</div>
	</form>

</body>
</html>